package org.discala.samples.complex.chef

import appliance._
import org.discala.scopes.{Prototype, Singleton}

/**
 * @author Chris Turner
 */
trait ChefModule {

  this: Singleton with Prototype =>

  // Internal container
  class ChefContainer extends ChefComponent
                      with VesselComponent {

    val chef = singleton(() => new HestonRamsey)
    val vessel = prototype(() => new MixingBowl)
    //val vessel = Prototype(() => new Blender)
    val appliance = new ApplianceProvider(ChefModule.this).provider
  }
  private val container = new ChefContainer

  // Providers
  def chef: () => Chef = container.chef
}